package com.sl.au.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.sl.au.entity.AuditNode;

public interface AuditNodeRepository extends JpaRepository<AuditNode,String> {

	@Query("select n from AuditNode n where n.pInstId=?1 and n.entityId=?2 order by createTime asc")
	List<AuditNode> getNodesById(String pInstId,String entityId);
	Long countByPInstIdAndEntityId(String pInstId,String entityId);
	void deleteByPInstId(String pInstId);
}
